<template>
	<view class="main">
		<view class="top-tab">
			<!-- 返回 -->
			<view class="fanhui">
				<view class="fh">
					<image class="img-fanhui" src="../../static/images/index/向左箭头(1).png" mode=""></image>
					<view class="fanhuia">返回</view>
				</view>
				<view class="mendianlb">门店列表</view>
			</view>
			<!-- 搜索 -->
			<view class="sousuo">
				<view class="sousuokuang">
					<view class="ssgjz">搜索关键字</view>
					<view class="sousuos">
						<image class="sousuos-img" src="../../static/images/index/搜索 (1).png" mode=""></image>
					</view>
				</view>
				<view class="shaixuan">
					<view class="ssgjz">筛选</view>
					<image class="sousuos-img" src="../../static/images/index/筛选.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="mendian">
			<!-- 1 -->
			<view class="mendianliebiao"@click="storedetails" v-for="(item,index) in userlist" :key="index"> 
				<view class="tuipianmd">
					<image class="tupian-img" :src="baseurl+item.logo" mode=""></image>
				</view>
				<view class="niuroufan" >
					<view class="jiyejia">{{item.name}}</view>
					<view class="meishi">{{item.services}}</view>
					<view class="chakanxiangqing">查看详情</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Shop from '../../apis/shop.js'
	export default {
		data() {
			return {
				query:{
					page:1,
					psize:6
				},
				userlist:[],
				baseurl:'http://estate.eshareedu.cn/estate/upload/'
			}
		},
		onLoad(){
			this.newlist()
		},
		methods:{
			
			storedetails(){
				uni.navigateTo({
				url: '/pages/Shop/StoreDetails/StoreDetails',
				})
			},
			async newlist(){
				let res =await Shop.userstoreslist(this.query)
				// console.log(res)
				if(res.errCode==10000){
					this.userlist=res.data.list
				}else{
					this.$message.error(res.errMsg)
				}
			}
		},
		//上拉加载
		onReachBottom() {
			this.query.psize ++
			this.newlist()
		}
	}
</script>

<style>
@import url('../../static/css/shop/shop.css');
</style>
